﻿using Ecommerce.API.Application.Command.LeaveCommand;
using Ecommerce.Services.Leaves;
using MediatR;
using System.Security.Cryptography;
using System.Xml.Linq;

namespace Ecommerce.API.Application.CommandHandlers.LeaveHandler
{
    public class LeaveupdateCommandHandler : IRequestHandler<LeaveupdateCommand, int>
    {
        private readonly ILeaveServices services;

        public LeaveupdateCommandHandler(ILeaveServices services)
        {
            this.services = services;
        }

        public Task<int> Handle(LeaveupdateCommand request, CancellationToken cancellationToken)
        {
            return services.leaveUpdate(request.Lid,request.State) ;
        }
    }
}
